package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 行为记录对象 biz_user_behavior
 * 
 * @author happiness
 * @date 2023-10-18
 */
@Schema(name = "Behavior", description = "行为记录")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_user_behavior")
public class Behavior extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;


    /** sys_user.user_id */
    @Schema(description = "sys_user.user_id")
    @Excel(name = "sys_user.user_id")
    private Long userId;

    /** $column.columnComment */
    @Schema(description = "行为信息")
    @Excel(name = "行为信息")
    private String behaviorInfo;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    //@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long etypeId;

    /** 是否删除|0-否 1-是|valid */
    @Schema(description = "是否删除|0-否 1-是|valid")
    @Excel(name = "是否删除|0-否 1-是|valid")
    private String deleted;

    @TableField(exist = false)
    private String nickName;

    /** 情绪*/
    @TableField(exist = false)
    private String label;

    /** 分值*/
    @TableField(exist = false)
    private Integer score;

    @TableField(exist = false)
    private Long deptId;




    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("behaviorInfo", getBehaviorInfo())
            .append("etypeId", getEtypeId())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("deleted", getDeleted())
            .append("version", getVersion())
            .toString();
    }
}
